<?php
/**
 * Created by PhpStorm.
 * User: zhongbaitong
 * Date: 2019/9/29
 * Time: 16:39
 */

namespace app\forum\model;

use think\model\concern\SoftDelete;

/**
 * @method belongsTo(string $string, string $string1)
 * @method hasMany(string $string, string $string1)
 */
class PostReply extends ForumBase
{
    use SoftDelete;

    public function fromUser(){
        return $this->belongsTo("User","from_uid");
    }

    public function toUser(){
        return $this->belongsTo("User","to_uid");
    }

    // 点赞
    public function likes(){
        return $this->hasMany("post_like","reply_id");
    }

}